package com.example.dto.dataresource;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * @Classname AddOrUpdateOrConnectDto
 * @Description TODO
 * @Version 1.0.0
 * @Date 2023/3/1 10:23
 * @Created by wlh12
 */
@ApiModel(value = "新增、修改以及连通测试（表单的左下角连通测试）的请求参数dto")
@Data
public class ConnectDto implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("数据库类型")
    @NotNull(message = "数据库类型不能为空")
    @NotBlank(message = "数据库类型不能为空")
    private String type;

    @ApiModelProperty("jdbc连接url")
    @NotNull(message = "jdbc连接url不能为空")
    @NotBlank(message = "jdbc连接url不能为空")
    private String url;

    @ApiModelProperty("驱动类名")
    @NotNull(message = "驱动类名不能为空")
    @NotBlank(message = "驱动类名不能为空")
    private String driverClassName;


    @ApiModelProperty("用户名")
    private String account;

    @ApiModelProperty("密码")
    private String password;
}
